GM.Name 	= "Zombie World (zombiebox)"
GM.Author 	= "Stabbykat"
GM.Email 	= ""
GM.Website 	= ""
GM.Help		= "--na--"
 
GM.Data = {}
 
  // if you remove this comment
DeriveGamemode( "fretta" )
include("playerbase.lua") IncludePlayerClasses()					// Automatically includes files in "gamemode/player_class"
 
GM.TeamBased = true					// Team based game or a Free For All game?
GM.AllowAutoTeam = false
GM.AllowSpectating = false
GM.SecondsBetweenTeamSwitches = 10
GM.GameLength = 60
GM.RoundLimit = 10					// Maximum amount of rounds to be played in round based games
GM.VotingDelay = 8					// Delay between end of game, and vote. if you want to display any extra screens before the vote pops up
 
GM.NoPlayerSuicide = false
GM.NoPlayerDamage = false
GM.NoPlayerSelfDamage = false		// Allow players to hurt themselves?
GM.NoPlayerTeamDamage = false		// Allow team-members to hurt each other?
GM.NoPlayerPlayerDamage = false 	// Allow players to hurt each other?
GM.NoNonPlayerPlayerDamage = false 	// Allow damage from non players (physics, fire etc)
GM.NoPlayerFootsteps = false		// When true, all players have silent footsteps
GM.PlayerCanNoClip = false			// When true, players can use noclip without sv_cheats
GM.TakeFragOnSuicide = false		// -1 frag on suicide
 
GM.MaximumDeathLength = 0.1			// Player will respawn if death length > this (can be 0 to disable)
GM.MinimumDeathLength = 0			// Player has to be dead for at least this long
GM.AutomaticTeamBalance = false     // Teams will be periodically balanced 
GM.ForceJoinBalancedTeams = false	// Players won't be allowed to join a team if it has more players than another team
GM.RealisticFallDamage = true
GM.AddFragsToTeamScore = true		// Adds player's individual kills to team score (must be team based)
 
GM.NoAutomaticSpawning = true		// Players don't spawn automatically when they die, some other system spawns them
GM.RoundBased = true				// Round based, like CS
GM.RoundLength = 60 * 6					// Round length, in seconds
GM.RoundPreStartTime = 1			// Preperation time before a round starts
GM.RoundPostLength = 7				// Seconds to show the 'x team won!' screen at the end of a round
GM.RoundEndsWhenOneTeamAlive = false	// CS Style rules
 
GM.EnableFreezeCam = false			// TF2 Style Freezecam
GM.DeathLingerTime = 45				// The time between you dying and it going into spectator mode, 0 disables
 
GM.SelectClass = true
GM.SelectModel = true               // Can players use the playermodel picker in the F1 menu?
GM.SelectColor = false				// Can players modify the colour of their name? (ie.. no teams)
 
GM.PlayerRingSize = 0              // How big are the colored rings under the player's feet (if they are enabled) ?
GM.HudSkin = "SimpleSkin"
 
GM.ValidSpectatorModes = { OBS_MODE_CHASE, OBS_MODE_IN_EYE, OBS_MODE_ROAMING }
GM.ValidSpectatorEntities = { "player" }	// Entities we can spectate
GM.CanOnlySpectateOwnTeam = false // you can only spectate players on your own team

//the abuse of scrollbars everywhere will never end

resource.AddFile("models/Zed/malezed_04.mdl")
resource.AddFile("models/Zed/malezed_06.mdl")
resource.AddFile("models/Zed/malezed_08.mdl")

resource.AddFile("models/player/Combine_sniper_2.mdl")
resource.AddFile("models/player/tf2/spy_blue.mdl")
util.PrecacheModel("models/Zed/malezed_04.mdl")
util.PrecacheModel("models/Zed/malezed_06.mdl")
util.PrecacheModel("models/Zed/malezed_08.mdl")

TEAM_ALIVE = 1
TEAM_DEAD = 2
function GM:CreateTeams()
 
	team.SetUp( TEAM_ALIVE, "THE LIVING", Color( 50, 255, 50 ), true )
	team.SetSpawnPoint( TEAM_ALIVE, { "info_player_start" } )
	team.SetClass( TEAM_ALIVE, { "human_big", "human_medic" } ) 
 
	team.SetUp( TEAM_DEAD, "THE DEAD", Color(  255, 50, 50 ), true )
	team.SetSpawnPoint( TEAM_DEAD, { "info_player_spawndead" } )
	team.SetClass( TEAM_DEAD, { "zombie_slave" } ) 
 
end

function GM:GetGameDescription()
	return "zombieworld (5 minute gamemode) r5"
end

function GM:ShowTeam()
	// don't show team menu
end

function GM:TeamHasEnoughPlayers( team )
	if(team ~= 1) then 
		return true
	else
		return (team.NumPlayers(1) >= 1)
	end
end